<script setup lang="ts">
import { transportTaskList } from '@/types/data'
const list = defineProps<
  { data?: transportTaskList[] }
>()
</script>

<template>
  <el-table height="410" stripe :data="list.data">
    <el-table-column label="任务编号" align="center" prop="id"></el-table-column>
    <el-table-column label="起始地" align="center" prop="startAgency"></el-table-column>
    <el-table-column label="目的地" align="center" prop="endAgency"></el-table-column>
    <el-table-column label="车辆" align="center" prop="licensePlate"></el-table-column>
    <el-table-column label="任务状态" align="center" prop="status">
      <template #default="scope">
        <el-tag v-show="scope.row.status === 2">进行中</el-tag>
        <el-tag class="ml-2" v-show="scope.row.status === 4" type="success">已完成</el-tag>
        <el-tag class="ml-2" v-show="scope.row.status === 1" type="info">待执行</el-tag>
        <el-tag class="ml-2" v-show="scope.row.status === 3" type="warning">待确认</el-tag>
        <el-tag class="ml-2" v-show="scope.row.status === 5" type="danger">已取消</el-tag>
      </template>
    </el-table-column>
  </el-table>
</template>
<style scoped></style>